﻿<Window x:Class="LauncherWPF.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:FluidKit.Controls;assembly=FluidKit"
        Title="MainWindow"
        Height="800" Width="1200"
        xmlns:my="clr-namespace:SStuff.FlowControls;assembly=SStuff.FlowControls">
    <!--WindowState="Maximized" WindowStyle="None" Topmost="True"-->
    <Window.Resources>
        <LinearGradientBrush x:Key="ReflectionBrush"
                             StartPoint="0,0"
                             EndPoint="0,1">
            <GradientStop Offset="0"
                          Color="#7F000000" />
            <GradientStop Offset=".5"
                          Color="Transparent" />
        </LinearGradientBrush>
        <DataTemplate x:Key="TestDataTemplate">
            <Border x:Name="ElementVisual" Background="White" Padding="5" BorderThickness="5" BorderBrush="LightGray" Grid.Row="0">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="50" />
                    </Grid.RowDefinitions>

                    <Image Grid.Row="0" Source="{Binding Path=Image, Mode=OneWay}" Stretch="Uniform" VerticalAlignment="Top" />
                    <TextBlock Grid.Row="1" Text="{Binding Path=Name, Mode=OneWay}"
                                   Foreground="Black"
                                   HorizontalAlignment="Center" 
                                   FontSize="30" FontFamily="Calibri" TextWrapping="WrapWithOverflow" FontWeight="Bold" />
                </Grid>
            </Border>
        </DataTemplate>
        <!--<Style TargetType="my:FlowItem3D" x:Key="empty3D">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="my:FlowItem3D">
                        <ContentPresenter />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>-->
        <DataTemplate x:Key="TestDataTemplate_Reflection">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="0.5*" />
                    <RowDefinition Height="0.5*" />
                </Grid.RowDefinitions>
                <Border x:Name="ElementVisual"
                        Grid.Row="0"
                        BorderThickness="2"
                        BorderBrush="LightYellow"
                        Background="Black"
                        Padding="2">
                    <Grid>
                    <Image Source="{Binding Path=Image, Mode=OneWay}"  Stretch="UniformToFill" Height="1000" Width="1000"
                               />
                    <TextBlock Text="{Binding Path=Name, Mode=OneWay}"
                                   Foreground="White"
                                   HorizontalAlignment="Center"
                                   FontSize="20"
                                   />
                </Grid>
                </Border>
                <Rectangle OpacityMask="{StaticResource ReflectionBrush}"
                           Grid.Row="1"
                           Height="{Binding ActualHeight, ElementName=ElementVisual}">
                    <Rectangle.Fill>
                        <VisualBrush Visual="{Binding ElementName=ElementVisual}">
                            <VisualBrush.RelativeTransform>
                                <ScaleTransform ScaleX="1"
                                                ScaleY="-1"
                                                CenterX="0.5"
                                                CenterY="0.5" />
                            </VisualBrush.RelativeTransform>
                        </VisualBrush>
                    </Rectangle.Fill>
                </Rectangle>
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="itemTemplate">
            <!--<my:InFlowContentControl  Content="{Binding Path=Image}" Background="{Binding Brush}" HeadingBackground="{Binding HeaderBrush}" Width="400" Height="400" />-->

        </DataTemplate>
    </Window.Resources>

    <Grid >
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1"
                                     StartPoint="0.5,0">
                <GradientStop Color="#FF181818" />
                <GradientStop Color="#FF7A7A7A"
                                  Offset="0.5" />
                <GradientStop Color="#FF1A1A1A"
                                  Offset="1" />
            </LinearGradientBrush>

        </Grid.Background>

        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="20" />
        </Grid.RowDefinitions>

        <!--<Controls:ElementFlow x:Name="_elementFlow"  SelectedIndexChanged="_elementFlow_SelectedIndexChanged"
                              ItemTemplate="{DynamicResource TestDataTemplate}" SelectedIndex="0"  TiltAngle="30" ItemGap="0.5" FrontItemGap="0.75"
                              MouseDown="Image_MouseUp" KeyDown="_elementFlow_KeyDown" Margin="76,12,-76,199" Grid.RowSpan="2">
 
            <Controls:ElementFlow.Layout >
                <Controls:CoverFlow />
            </Controls:ElementFlow.Layout>
           
            <Controls:ElementFlow.Camera>
                <PerspectiveCamera FieldOfView="60"
                                   Position="0,3,6"
                                   LookDirection="0,-3,-6" />
            </Controls:ElementFlow.Camera>
        </Controls:ElementFlow>-->


        <TextBlock x:Name="debugText" Grid.Row="1" Text="" />
        <!--<my:FlowItem3D Height="50" HorizontalAlignment="Left" Margin="322,485,0,0" Name="_elementFlow" VerticalAlignment="Top" Width="100" ContentTemplate="{StaticResource TestDataTemplate}" />-->

        <!--<my:FlowItemsControl3D Name="_elementFlow"  Height="800" Width="1200"   
                           ItemTemplate="{StaticResource itemTemplate}" 
                           ItemContainerStyle="{StaticResource empty3D}"
                              KeyDown="_elementFlow_KeyDown" >-->

        </my:FlowItemsControl3D>
    </Grid>
</Window>
